package top.lfyao.designpattern.details.factory.method;


/**
 * 简单工厂模式与策略模式结合
 *      客户端只需要认识一个类algorithmContext就可以了，隐藏了工厂父类，耦合性更低
 */
public class FactoryClient {
    public static void main(String[] args) {

        AlgorithmContext algorithmContext = new AlgorithmContext("+");
        double result = algorithmContext.getResult(10, 20);
        System.out.println(result);
        
        
        
        
     /*   IFactory factory = new MultiplicationFactory();
        Operation operation = factory.createOperation();
        operation.numberA = 66;
        operation.numberB = 10;
        System.out.println(operation.result());*/
    }
}
